<script setup>
import { onMounted, ref } from 'vue'
import image from './../assets/vue.svg'

const newSrc = ref()
const getBase64 = (el, str) => {
  console.log('getBase64...', el, str)
  newSrc.value = str
}

onMounted(() => {
  // console.log('mounted', image)
})
</script>

<template>
  <div>
    <div>TestBase64</div>
    <img :src="image" v-base64="getBase64" alt="" />
    <img :src="newSrc" alt="" />
  </div>
</template>

<style>
.images img {
  width: 200px;
  opacity: 0.2;
}
</style>
